﻿using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;

namespace FrameworkCore.Modules.Startups;

/// <summary>
/// 表示在应用程序启动时配置服务和中间件的对象
/// </summary>
public partial interface INetModulerStartup
{
    /// <summary>
    /// 添加和配置任何中间件
    /// </summary>
    /// <param name="services">服务描述符的集合</param>
    /// <param name="configuration">应用程序的配置</param>
    void ConfigureServices(IServiceCollection services, IConfiguration configuration);

    /// <summary>
    /// 配置已添加中间件的使用方式
    /// </summary>
    /// <param name="application">用于配置应用程序请求管道的构建器</param>
    void Configure(IApplicationBuilder application);

    /// <summary>
    /// 获取此启动配置实现的顺序
    /// </summary>
    int Order { get; }
}
